Telegram Group & Telegram Channel
Получаем информацию о памяти на диске

Со встроенным модулем shutil многие уже, вероятно, знакомы, но его обычно используют в контексте задач копирования, переноса файлов и папок.

Но с помощью shutil мы можем даже получить информацию о памяти на жестком диске компьютера. Метод disk_usage возвращает количество всей, занятой и свободной памяти.

Так как все три значения возвращаются в байтах, в примере мы их перевели и вывели в гигабайты для лучшей наглядности.

#shutil



tg-me.com/python_academy/957
Create:
Last Update:

Получаем информацию о памяти на диске

Со встроенным модулем shutil многие уже, вероятно, знакомы, но его обычно используют в контексте задач копирования, переноса файлов и папок.

Но с помощью shutil мы можем даже получить информацию о памяти на жестком диске компьютера. Метод disk_usage возвращает количество всей, занятой и свободной памяти.

Так как все три значения возвращаются в байтах, в примере мы их перевели и вывели в гигабайты для лучшей наглядности.

#shutil

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/957

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.

A Telegram spokesman declined to comment on the bond issue or the amount of the debt the company has due. The spokesman said Telegram’s equipment and bandwidth costs are growing because it has consistently posted more than 40% year-to-year growth in users.

Python Academy from br


Telegram Python Academy
FROM USA